#coding=utf
'''
Splitting Strings on Any of Multiple Delimiters
re.split()
'''
line = 'asdf fjdk; afed, fjek,asdf,      foo'
import re
a = re.split(r'[;,\s]\s*', line)
print(a)

fields = re.split(r'(;|,|\s)\s*', line)
print(fields)

values = fields[::2]
delimiters = fields[1::2] + ['']
print(delimiters)
c = ''.join(v+d for v, d in zip(values, delimiters))
print(c)

d = re.split(r'(?:,|;|\s)\s*', line)
print(d)